package com.example.demo.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Book {
    public Integer getIfBack() {
        return ifBack;
    }

    public void setIfBack(Integer ifBack) {
        this.ifBack = ifBack;
    }

    private Integer bookinfoId;

    private String bookname;

    private String authorname;

    private String press;

    private String introduction;

    private String isbn;

    private Double price;

    private Integer maxRenewCnt;

    private String deleteFlag;

    private Integer ifBack;

    private String imgSrc;

    public Book(Integer bookinfoId, String bookname, String authorname, String press, String introduction, String isbn, Double price) {
        this.bookinfoId=bookinfoId;
        this.bookname=bookname;
        this.authorname=authorname;
        this.press=press;
        this.introduction=introduction;
        this.isbn=isbn;
        this.price=price;
    }

    public Integer getBookinfoId() {
        return bookinfoId;
    }

    public void setBookinfoId(Integer bookinfoId) {
        this.bookinfoId = bookinfoId;
    }

    public String getBookname() {
        return bookname;
    }

    public void setBookname(String bookname) {
        this.bookname = bookname;
    }

    public String getAuthorname() {
        return authorname;
    }

    public void setAuthorname(String authorname) {
        this.authorname = authorname;
    }

    public String getPress() {
        return press;
    }

    public void setPress(String press) {
        this.press = press;
    }

    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    public String getIsbn() {
        return isbn;
    }

    public void setIsbn(String isbn) {
        this.isbn = isbn;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Integer getMaxRenewCnt() {
        return maxRenewCnt;
    }

    public void setMaxRenewCnt(Integer maxRenewCnt) {
        this.maxRenewCnt = maxRenewCnt;
    }

    public String getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(String deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", bookinfoId=").append(bookinfoId);
        sb.append(", bookname=").append(bookname);
        sb.append(", authorname=").append(authorname);
        sb.append(", press=").append(press);
        sb.append(", introduction=").append(introduction);
        sb.append(", isbn=").append(isbn);
        sb.append(", price=").append(price);
        sb.append(", maxRenewCnt=").append(maxRenewCnt);
        sb.append(", deleteFlag=").append(deleteFlag);
        sb.append("]");
        return sb.toString();
    }
}